<?php

namespace App\Http\Controllers\Company;

use App\Exceptions\ApiException;
use App\Http\Requests\BasicRequest;
use App\Libraries\msg\Msg;
use App\Models\HouseDistrict;
use App\Models\Config;
use App\Models\ServiceMonitor;
use Illuminate\Support\Facades\DB;

use App\Models\ClientUserManagerWork;

class MonitorController extends CommonController
{
     public function __construct(){
          parent::__construct();
     }

     //监控点列表
     public function index(){


        $return = [];
         // $monitor_list=ServiceMonitor::where(['village_id'=>$this->ship->village_id])->where(function($query){
             // 如果权限是大区
             // if($this->ship->village_id != $this->ship->house_id){
                 // $query->where(['partition_id'=>$this->ship->house_id]);
             // }
         // })->get()->groupBy('partition_id')->toArray();

         // $return = array();
         // $i=0;
         // foreach($monitor_list as $key=>$val){
              // $return[$i]['partition_name']= HouseDistrict::where(['id'=>$key])->value('name');
              // $return[$i]['partition_id']= $key;
              // $return[$i]['monitor_list']= $val;
              // $i++;
         // };
        //return json_success('OK',['monitor'=>$return,'accessToken'=>$token]);
     }

}